home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-11-09 | 42.3 KB | 1,621 lines |
-
-
-
-
-
- TPSTR STRING UTILITIES
- USER'S GUIDE
-
-
-
-
-
-
-
- T A B L E O F C O N T E N T S
-
-
-
-
- 1 - INTRODUCTION .................................. Page 1
- - Features ............................ Page 1
- - Using TpStr ............................ Page 1
- - Licensing ............................ Page 1
- - Customer Service ............................ Page 1
-
- 2 - GETTING STARTED ............................... Page 2
- - Distribution files .......................... Page 2
- - Uses clause .......................... Page 2
- - Dictionnary .......................... Page 3
-
- 3 - REFERENCES ............................... Page 23
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- This version is 1.00, (c) RAVIART Philippe 1992,All Rights reserved.
-
-
- 1 - INTRODUCTION Page 1
- - Features
-
-
- TpStr provide you really powerfull functions and procedures to
- manage strings or chars.
-
- Main advantage of using TpStr is the ultimate speed and the very
- large count of procedures and functions.This version 1.00 offers
- you 88 functions!.
-
-
- - Using TpStr
-
-
- As shareware indicates,you can freely try software for a few
- month without charge.
- TpStr can be freely use by you for two months.After this delay
- you may register for it or put it in the trash! (I don't hope !).
- See Licensing for more informations.
-
-
- - Customer Service
-
-
- If any problems ,suggestions, comments or questions, you may
- contact me with Compuserve,Fax or mail.
-
- a) compuserve: Contact me with my PPN number of 100135,503.
- b) fax me at 99-08-97-46 (This number is located in FRANCE so
- look for your foreign code numbers.
- c) Write to me at:
-
- Mr. RAVIART Philippe
- Bourg de TREAL
- 56140 MALESTROIT
-
- (FRANCE)
-
- In all this cases you should provide me:
-
- a) a descrition of the bug or problem.
- b) your machine type and configuration.
- c) a copy of your config.sys and autoexec.bat
-
- Anyone who contact me for a bug will immediately receive a new free
- version with bug fixed.
-
-
- - Licensing
-
- As shareware is NOT FREE software you should register for its
- commercial or private use.
- TpStr package is sold for only $40 until December 1993.
-
- The file REGISTER.TXT permits you to register.
-
- All registered users will received a complete source code for all
- the unit present in this package.
-
-
-
-
-
-
-
-
- 2 - GETTING STARTED Page 2
-
- - Distribution files
-
- In this version, TpStr contains:
-
- TPSTR.TPU Compiled with {$N-,E-}
- TPNSTR.TPU Compiled with {$N+,E+}
- TPSTR.DOC This file.
- TPFAST.TPU Very fast routines used by TpStr.
- REGISTER.TXT Registration form.
-
-
- - Uses clause
-
- For your easiness using TpStr your Uses Clause should look like
- this:
-
- {$IFOPT N-}
- Uses TpStr,
- ...,
- ...;
- {$ELSE}
- Uses TpNStr,
- ...,
- ...;
- {$ENDIF}
-
-
- When you use $N+ options, you can deal with Extended,Comp,single
- and double type.So you can find functions using these types into
- TpNStr but NOT in TpStr (limited to standard real type).
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - Dictionnary Page 3
-
-
- ---------------------------------------------------------------
- function StrL (L: Longint) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert a LongInt to a string.
-
- Example : S := StrL(MaxLongInt);
-
- Result : S = '2147483647'
-
- Rating : 4560/s
-
- ---------------------------------------------------------------
- function StrLF (L: Longint;Field: Integer) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert a LongInt to a string.
-
- Example : S1 := StrLF(MaxLongInt,5);
- S2 := StrLF(1,5);
-
- Result : S1 = '2147483647'
- S2 = ' 1'
-
- Rating : 6760/s
-
- ---------------------------------------------------------------
- function StrR (R: Real) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert a Real to a string.
-
- Example : S1 := StrR(Pi);
- S2 := StrR(1);
-
- Result : S1 = ' 3.1415926536E+00';
- S2 := ' 1.00000000000000E+0000'
-
- Rating : 860/s
-
- ---------------------------------------------------------------
- function StrRF (R: Real;Field: Integer) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert a Real to a string.
-
- Example : S1 := StrRF(Pi,1);
- S2 := StrRF(1,5);
-
- Result : S1 = ' 3.1E+00';
- S2 = ' 1.0E+0000';
-
- Rating : 920/s
-
-
-
-
-
-
-
-
-
- Page 4
-
- ---------------------------------------------------------------
- function StrRFD(R: Real;Field,Decimals: Integer) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert a Real to a string.
-
- Example : S1 := StrRFD(Pi,4,2);
- S2 := StrRFD(1,4,2);
-
- Result : S1 = '3.14'
- S2 = '1.00'
-
- Rating : 919/s
-
- -------------------------------
- {$IFOPT N+}
- -------------------------------
-
- This Part is include only if option $N is +.
-
- ---------------------------------------------------------------
- function StrC (C: Comp) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert a 64-Bit integer to a string.
-
- Example : S1 := StrC(9.2e18);
- S2 := StrC(1);
-
- Result : S1 = ' 9.20000000000000E+0018'
- S2 = ' 1.00000000000000E+0000'
-
- Rating : 932/s
-
- ---------------------------------------------------------------
- function StrCF (C: Comp;Field: Integer) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert a 64-Bit integer to a string.
-
- Example : S1 := StrCF(9.2e18,10);
- S2 := StrCF(1,5);
-
- Result : S1 = ' 9.2E+0018'
- S2 = ' 1.0E+0000'
-
- Rating : 1004/s
-
- ---------------------------------------------------------------
- function StrCFD(C: Comp;Field,Decimals: Integer) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert a 64-Bit integer to a string.
-
- Example : S1 := StrCFD(9.2e18,10,5);
- S2 := StrCFD(9,5,2);
-
- Result : S1 = '9200000000000000000.00000'
- S2 = ' 9.00'
-
- Rating : 951/s
-
-
-
-
- Page 5
-
- ---------------------------------------------------------------
- function StrD (D: Double) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert a double to a string.
-
- Example : S1 := StrD(1.7e308);
- S2 := StrD(1);
-
- Result : S1 = ' 1.70000000000000E+0038'
- S2 = ' 1.00000000000000E+0000'
-
- Rating : 784/s
-
- ---------------------------------------------------------------
- function StrDF (D: Double;Field: Integer) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert a double to a string.
-
- Example : S1 := StrDF(1.7e308,10);
- S2 := StrDF(1,5);
-
- Result : S1 = ' 7.7E+0307'
- S2 = ' 1.0E+0000'
-
- Rating : 847/s
-
- ---------------------------------------------------------------
- function StrDFD(D: Double;Field,Decimals: Integer) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert a double to a string.
-
- Example : S1 := StrDFD(1.7e308,15,5);
- S2 := StrDFD(6,8,0);
-
- Result : S1 = ' 7.69999999999999980E+0307'
- S2 = ' 6'
-
- Rating : 822/s
-
- ---------------------------------------------------------------
- function StrE (E: Extended) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert an extended real to a string.
-
- Example : S1 := StrE(1.1e4932);
- S2 := StrE(5);
-
- Result : S1 = ' 1.10000000000000E+4932'
- S2 = ' 5.00000000000000E+0000'
-
- Rating : 624/s
-
-
-
-
-
-
-
-
-
- Page 6
-
- ---------------------------------------------------------------
- function StrEF (E: Extended;Field: Integer) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert an extended real to a string.
-
- Example : S1 := StrEF(1.1e4932,10);
- S2 := StrEF(1,5);
-
- Result : S1 = ' 1.1E+4932'
- S2 = ' 1.0E+0000'
-
- Rating : 654/s
-
- ---------------------------------------------------------------
- function StrEFD(E: Extended;Field,Decimals: Integer):String;
- ---------------------------------------------------------------
-
- Purpose : Convert an extended real to a string.
-
- Example : S1 := StrEFD(1.1e4932,15,5);
- S2 := StrEFD(1,8,2);
-
- Result : S1 = ' 1.10000000000000000E+4932'
- S2 = ' 1.00'
-
- Rating : 634/s
-
- ---------------------------------------------------------------
- function StrS (S: Single) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert a single real to a string.
-
- Example : S1 := StrS(3.4e38);
- S2 := StrS(8);
-
- Result : S1 = ' 3.39999995214436E+0038'
- S2 = ' 8.00000000000000E+0000'
-
- Rating : 871/s
-
- ---------------------------------------------------------------
- function StrSF (S: Single;Field: Integer) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert a single real to a string.
-
- Example : S1 := StrSF(3.4e38,10);
- S2 := StrSF(2,5);
-
- Result : S1 = ' 304E+0038'
- S2 = ' 2.0E+0000'
-
- Rating : 931/s
-
-
-
-
-
-
-
-
-
- Page 7
- ---------------------------------------------------------------
- function StrSFD(E: Single;Field,Decimals: Integer) :String;
- ---------------------------------------------------------------
-
- Purpose : Convert a single real to a string.
-
- Example : S1 := StrSFD(3.4e38,15,5);
- S2 := StrSFD(1800,6,2);
-
- Result : S1 = ' 3039999995214436425E+0038'
- S2 = '1800.00'
-
- Rating : 888/s
-
- -------------------------------
- {$ENDIF}
- -------------------------------
-
-
-
- ---------------------------------------------------------------
- Procedure ChrDel (Var S: String;Match: Char);
- ---------------------------------------------------------------
-
- Purpose : Delete all matching characters in string S.
-
- Example : S := 'Hello';
- ChrDel(S,'l');
-
- Result : S = 'Heo'
-
- Rating : 49000/s
-
- ---------------------------------------------------------------
- Procedure ChrDelL(Var S: String;Match: Char);
- ---------------------------------------------------------------
-
- Purpose : Delete all characters matching from left of S.
-
- Example : S1 := '!99XX';
- S2 := '!99XX';
- ChrDelL(S1,'9');
- ChrDelL(S2,'!');
-
- Result : S1 = '!99XX'
- S2 = '99XX'
-
- Rating : 49000/s
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 8
- ---------------------------------------------------------------
- Procedure ChrDelR(Var S: String;Match: Char);
- ---------------------------------------------------------------
-
- Purpose : Delete all matching character found from right of S.
-
- Example : S1 := '1234567890';
- S2 := '1234567800';
- ChrDelR(S1,'2');
- ChrDelR(S2,'0');
-
- Result : S1 = '1234567890'
- S2 = '12345678';
-
- Rating : 58500/s
-
- ---------------------------------------------------------------
- Procedure ChrFill(Var S: String;Fill: Char;MaxLen: Byte);
- ---------------------------------------------------------------
-
- Purpose : Fill a string with a character.
-
- Example : S := '';
- ChrFill(S,'9',5);
-
- Result : S = '99999'
-
- Rating : 66300/s
-
- ---------------------------------------------------------------
- Procedure ChrPadC(Var S: String;Fill: Char;MaxLen: Byte);
- ---------------------------------------------------------------
-
- Purpose : Pads a string to left and rigth with a character.
-
- Example : S1 := 'Hello';
- S2 := 'Hello Friends';
- ChrPadC(S1,'-',10);
- ChrPadC(S2,'+',10);
-
- Result : S1 = '---Hello--'
- S2 = 'Hello Friends'
-
- Rating : 37600/s
-
- ---------------------------------------------------------------
- procedure ChrPadL(Var S: String;Fill: Char;MaxLen: Byte);
- ---------------------------------------------------------------
-
- Purpose : Pads a string to left with a character.
-
- Example : S := 'Hello';
- ChrPadL(S,'-',10);
-
- Result : S = '-----Hello'
-
- Rating : 48900/s
-
-
-
-
-
-
-
-
- Page 9
-
- ---------------------------------------------------------------
- Procedure ChrPadR(Var S: String;Fill: Char;MaxLen: Byte);
- ---------------------------------------------------------------
-
- Purpose : Pads a string to rigth with a character.
-
- Example : S := 'Hello';
- ChrPadR(S,'-',10);
-
- Result : S = 'Hello-----'
-
- Rating : 59600/s
-
- ---------------------------------------------------------------
- Procedure ChrRepl(Var S:String;c1,c2 : Char);
- ---------------------------------------------------------------
-
- Purpose : Replace all matching characters with another character.
-
- Example : S := 'mm/jj/aaaa';
- ChrRepl(S,'/',':');
-
- Result : S = 'mm:jj:aaaa'
-
- Rating : 26000/s
-
- ---------------------------------------------------------------
- Procedure ChrReplI(Var S:String;c1,c2 : Char);
- ---------------------------------------------------------------
-
- Purpose : Replace all matching characters with another character
- Without matching case.
-
- Example : S := 'arArtarrR';
- ChrReplI(S,'a','b');
-
- Result : S = 'brbrtbrrR'
-
- Rating : 4950/s
-
- ---------------------------------------------------------------
- Procedure StrCat(Var Dest: String;S: String;Maxlen: Byte);
- ---------------------------------------------------------------
-
- Purpose : Concatenates two strings for a maximum length of Maxlen.
-
- Example : S1 := 'Hello ';
- S2 := 'Hello ';
- StrCat(S1,'Friends',50);
- StrCat(S2,'Friends',11);
-
- Result : S1 = 'Hello Friends'
- S2 = 'Hello Frien'
-
- Equivalent: Dest := Copy(Dest+S,1,MaxLen);
-
- Rating : 31800/s
-
-
-
-
-
-
-
- Page 10
-
- ---------------------------------------------------------------
- Function StrCmp(S1,S2: String):ShortInt;
- ---------------------------------------------------------------
-
- Purpose : Compare two strings and return:
- -1 if s1 < s2
- 0 if s1 = s2
- 1 if s1 > s2
-
- Example : Short1 := StrCmp('Hello','HEllo');
- Short2 := StrCmp('Hello','Hello');
- Short3 := StrCmp('HEllo','Hello');
-
- Result : Short1 = 1
- Short2 = 0
- Short3 = -1
-
- Rating : 47600/s
-
- ---------------------------------------------------------------
- Function StrCmpI(S1,S2: String):ShortInt;
- ---------------------------------------------------------------
-
- Purpose : Compare two strings without matching case and return:
- -1 if s1 < s2
- 0 if s1 = s2
- 1 if s1 > s2
-
- Example : Short1 := StrCmpI('abcdef','ABCDEF');
- Short2 := StrCmpI('','abcdef');
- Short3 := StrCmpI('abcdef','');
-
- Result : Short1 = 0
- Short2 = -1
- Short3 = 1
-
- Rating : 14000/s
-
- ---------------------------------------------------------------
- Procedure StrCopy(Var Dest: String;S: String;Index,Count: Byte);
- ---------------------------------------------------------------
-
- Purpose : Copy one string to another
-
- Example : StrCopy(S1,'Hello Friends...',1,5);
- StrCopy(S2,'Hello Friends...',7,255);
- StrCopy(S3,'Hello Friends...',7,2);
-
- Result : S1 = 'Hello'
- S2 = 'Friends...'
- S3 = 'Fr'
-
- Rating : 34700/s
-
-
-
-
-
-
-
-
-
-
-
- Page 11
-
- ---------------------------------------------------------------
- Procedure StrCut(Var S: String;MaxLen: Byte);
- ---------------------------------------------------------------
-
- Purpose : Truncate a string at Maxlen
-
- Example : S1 := 'Hello Friends';
- S2 := 'Hello Friends';
- StrCut(S1,5);
- StrCut(S2,100);
-
- Result : S1 = 'Hello'
- S2 = 'Hello Friends';
-
- Rating : 72500/s
-
- ---------------------------------------------------------------
- Procedure StrDeTab(Var Dest: String;S: String;TabSize: Byte);
- ---------------------------------------------------------------
-
- Purpose : Replace all Tab characters with <tabsize> spaces.
-
- Example : StrDeTab(S,'Hello'#9'Friends',5);
-
- Result : S = 'Hello Friends'
-
- Rating : 19000/s
-
- ---------------------------------------------------------------
- Procedure StrFill(Var S: String;Fill: String;Count, MaxLen: Byte);
- ---------------------------------------------------------------
-
- Purpose : Fill a string with <count> <another string>
-
- Example : StrFill(S,'Hello ',5,100);
-
- Result : S = 'Hello Hello Hello Hello Hello '
-
- Rating : 6200/s
-
- ---------------------------------------------------------------
- Procedure StrJC(Var S: String;MaxLen: Byte);
- ---------------------------------------------------------------
-
- Purpose : Pads a string left and right side with spaces.
-
- Example : S := 'Hello';
- StrJC(S,10);
-
- Result : S = ' Hello ';
-
- Rating : 39700/s
-
-
-
-
-
-
-
-
-
-
-
-
- Page 12
-
- ---------------------------------------------------------------
- Procedure StrJL(Var S: String;MaxLen: Byte);
- ---------------------------------------------------------------
-
- Purpose : Pads a string to left with spaces.
-
- Example : S := 'Hello';
- StrJL(S,10);
-
- Result : S = ' Hello';
-
- Rating : 38800/s
-
- ---------------------------------------------------------------
- Procedure StrJR(Var S: String;MaxLen: Byte);
- ---------------------------------------------------------------
-
- Purpose : Pads a string to rigth with spaces.
-
- Example : S := 'Hello';
- StrJR(S,10);
-
- Result : S = 'Hello '
-
- Rating : 40000/s
-
- ---------------------------------------------------------------
- function StrLwr(S: String) :String;
- ---------------------------------------------------------------
-
- Purpose : Lowercase a string (international support).
-
- Example : S := StrLwr('ABCDEFGHIJK');
-
- Result : S = 'abcdefghijk'
-
- Rating : 5900/s
-
- ---------------------------------------------------------------
- Procedure StrMove(Var Dest: String;S: String);
- ---------------------------------------------------------------
-
- Purpose : Moves a string into another.
-
- Equivalent: Dest := S;
-
- Example : StrMove(Dest,S);
-
- Result : Dest = S
-
- Rating : 24900/s
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 13
-
- ---------------------------------------------------------------
- Procedure StrOvr(Var Dest: String;S: String;Index: byte);
- ---------------------------------------------------------------
-
- Purpose : Overwrite a string with another.
- Index should be in the range 1..Length(Dest) - Length(S)
-
- Example : S := 'Hello Girl friends !';
- StrOvr(S,'boys',7);
-
- Result : S = 'Hello boys friends !'
-
- Rating : 40700/s
-
- ---------------------------------------------------------------
- Procedure StrPeek(Var Dest: String;Var Source;MaxLen: Byte);
- ---------------------------------------------------------------
-
- Purpose : copy source from 1 to Maxlen to dest.
- Dest[0] becomes maxlen.
-
- Equivalent: Dest := Copy(Source,1,Maxlen);
- (if source is a string !).
-
- Example : S := 'Hello friends';
- StrPeek(Dest,S,5);
-
- Result : Dest = 'Hello'
-
- Rating : 39800/s
-
- ---------------------------------------------------------------
- Procedure StrPoke(Var Dest;Source: String);
- ---------------------------------------------------------------
-
- Purpose : moves source to dest without length byte.
-
- Example : Var Dest: tByteArray;
- S := 'Hello friends';
- StrPoke(Dest,S);
-
- Result : Dest[0] thru dest[12] = S[1] thru Dest[12]
-
- Rating : 24900/s
-
- ---------------------------------------------------------------
- Procedure StrReTab(Var Dest: String;S: String;TabSize: Byte);
- ---------------------------------------------------------------
-
- Purpose : Replace <tabsize> spaces with #9 character.
-
- Example : StrRetab(S1,'Hello Friends',5);
- StrRetab(S2,'Hello Friends',2);
- StrReTab(S3,'Hello Friends',6);
-
- Result : S1 = 'Hello'#9'Friends'
- S2 = 'Hello'#9#9' Friends'
- S3 = 'Hello'#9' Friends'
-
- Rating : 8500/s
-
-
-
-
- Page 14
-
- ---------------------------------------------------------------
- Procedure StrRev(Var S: String);
- ---------------------------------------------------------------
-
- Purpose : Reverse a string.
-
- Example : S := 'abcdefghijk';
- StrRev(S);
-
- Result : S = 'kjihgfedcba';
-
- Rating : 41200/s
-
- ---------------------------------------------------------------
- function StrUpr(S: String) :String;
- ---------------------------------------------------------------
-
- Purpose : Upcase a string with international support.
-
- Example : S := 'abczzzéèàùôûîâê';
- S := StrUpr(S);
-
- Result : S = 'ABCZZZÉEAUOUIAE'
-
- Rating : 4500/s
-
- ---------------------------------------------------------------
- Function IsAscii (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : Return true if C < #128
-
- Example : B1 := IsAscii('û');
- B2 := IsAscii('7');
-
- Result : B1 = False
- B2 = True
-
- Rating :101200/s
-
- ---------------------------------------------------------------
- Function IsCntrl (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : Return true if C is in [#0..#31,#127];
-
- Rating : 79200/s
-
- ---------------------------------------------------------------
- Function IsGraph (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : Return true if C is in [#33..#126]
-
- Rating : 81000/s
-
-
-
-
-
-
-
-
-
- Page 15
-
- ---------------------------------------------------------------
- Function IsPrint (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : return true if C is in [#32..#126].
-
- Rating : 80800/s
-
- ---------------------------------------------------------------
- Function IsSigned(C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : return True if C is in ['0'..'9','+','-'].
-
- Rating : 92800/s
-
- ---------------------------------------------------------------
- Function IsSpace (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : return True if C is in [' ',#9..#13].
-
- Rating : 76800/s
-
- ---------------------------------------------------------------
- Function IsAlnum (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : Return True if C is in ['0'..'9','A'..'Z','a'..'z'].
-
- Rating : 91400/s
-
- ---------------------------------------------------------------
- Function IsAlpha (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : Return True if C is in ['A'..'Z','a'..'z'].
-
- Rating : 88200/s
-
- ---------------------------------------------------------------
- Function IsDigit (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : Return True if C is in ['0'..'9'].
-
- Rating : 91200/s
-
- ---------------------------------------------------------------
- Function IsDos (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : Return True if C is in ['!','#'..'*','-','.','0'..':',
- '?'..'Z''\','^','{','}','~'].
-
- Rating : 88400/s
-
-
-
-
-
-
-
-
- Page 16
-
- ---------------------------------------------------------------
- Function IsFile (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : Return true if IsDos(C) And C is not in ['*',':','?'].
-
- Rating : 89600/s
-
- ---------------------------------------------------------------
- Function IsLower (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : Return True if C is in ['a'..'z'].
-
- Rating : 88700/s
-
- ---------------------------------------------------------------
- Function IsPunct (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : Return True if IsGraph(C) and Not(IsAlNum(C)).
-
- Rating : 88600/s
-
- ---------------------------------------------------------------
- Function IsReal (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : Return true if ifSigned(C) or C is in ['.','e','E'].
-
- Rating : 88400/s
-
- ---------------------------------------------------------------
- Function IsUpper (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : Return True if C is in ['A'..'Z'].
-
- Rating : 88700/s
-
- ---------------------------------------------------------------
- Function IsHex (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : Return True if C is in ['0'..'9','a'..'f','A'..'F'].
-
- Rating : 86700/s
-
- ---------------------------------------------------------------
- Function IsPath (C: Char):Boolean;
- ---------------------------------------------------------------
-
- Purpose : Return true if IsDos(C) or IsFile(C).
-
- Rating : 73600/s
-
-
-
-
-
-
-
-
-
- Page 17
-
- ---------------------------------------------------------------
- Function Copy(S:String;Index,Count: Integer):string;
- ---------------------------------------------------------------
-
- Purpose : Exact replacement of System.Copy proc.
-
- Rating : 34400/s
-
- ---------------------------------------------------------------
- Procedure Delete(Var S: String;Index,Count: Integer);
- ---------------------------------------------------------------
-
- Purpose : Exact replacement of System.Delete proc.
-
- Rating : 48000/s
-
- ---------------------------------------------------------------
- Function Pos(Find,S: String):integer;
- ---------------------------------------------------------------
-
- Purpose : Exact replacement of System.Pos proc.
-
- Rating : 42800/s
-
- ---------------------------------------------------------------
- function LoCase(C: Char) :Char;
- ---------------------------------------------------------------
-
- Purpose : Lowercase C with international support.
-
- Rating : 72000/s
-
- ---------------------------------------------------------------
- function UpCase(C: Char) :Char;
- ---------------------------------------------------------------
-
- Purpose : UpperCase C with international support.
-
- Rating : 88400/s
-
- ---------------------------------------------------------------
- function ATrim(S: String):string;
- ---------------------------------------------------------------
-
- Purpose : Delete all rights and lefts spaces chars.
-
- Example : S := ' Hello guys ';
- S := ATrim(S);
-
- Result : S = 'Hello guys'
-
- Rating : 20900/s
-
-
-
-
-
-
-
-
-
-
-
-
- Page 18
-
- ---------------------------------------------------------------
- function LTrim(S: String):string;
- ---------------------------------------------------------------
-
- Purpose : Delete all spaces characters found at left of S.
-
- Example : S := ' Hello';
- S := LTrim(S);
-
- Result : S = 'Hello'
-
- Rating : 27300/s
-
- ---------------------------------------------------------------
- function RTrim(S: String):string;
- ---------------------------------------------------------------
-
- Purpose : Delete all spaces characters found at rigth oof S.
-
- Example : S := 'Hello ';
- S := RTrim(S);
-
- Result : S = 'Hello'
-
- Rating : 27700/s
-
- ---------------------------------------------------------------
- function Replicate(Fill: Char;MaxLen:Byte):string;
- ---------------------------------------------------------------
-
- Purpose : Create a string with <maxlen> chars repeated.
-
- Example : S := Replicate('9',5);
-
- Result : S = '99999';
-
- Rating : 41600/s
-
- ---------------------------------------------------------------
- Function Soundex(S: String):String;
- ---------------------------------------------------------------
-
- Purpose : Return a 4 characters string representing the soundex
- code of S.
-
- Example : S1 := Soundex('Hill');
- S2 := Soundex('EAL');
-
- Result : S1 = 'H400'
- S2 = 'E400'
-
- Rating : 26500/s
-
-
-
-
-
-
-
-
-
-
-
-
- Page 19
-
- ---------------------------------------------------------------
- Function WrdQty(S: String):Byte;
- ---------------------------------------------------------------
-
- Purpose : Return the word count of S.
-
- Example : Qt1 := WrdQty('Hello friends');
- Qt2 := WrdQty('');
- Qt3 := WrdQty('Hello friends , how are you today ?');
-
- Result : Qt1 = 2;
- Qt2 = 0;
- Qt3 = 8
-
- Rating : 32400/s
-
- ---------------------------------------------------------------
- function HEXStrToLong(Str:string):longint;
- ---------------------------------------------------------------
-
- Purpose : Return the longint value of Hex string Str.
-
- Example : L := HexStrToLong('$000afffe');
- Result : L := 720894
-
- Rating : 24400/s
-
- ---------------------------------------------------------------
- function LongHex(L : LongInt) : string;
- ---------------------------------------------------------------
-
- Purpose : return an hex string representing a longint.
-
- Example : S := LongHex(720894);
-
- Result : S = '$000AFFFE'
-
- Rating : 26800/s
-
- ---------------------------------------------------------------
- function LongBin(L : LongInt) : string;
- ---------------------------------------------------------------
-
- Purpose : Return a binary string representing a longint.
-
- Example : S := LongBin(10);
-
- Result : S = '0000000000001010'
-
- Rating : 873/s
-
- ---------------------------------------------------------------
- function LongOctal(L : LongInt) : string;
- ---------------------------------------------------------------
-
- Purpose : Return an octal string representing a longint.
-
- Example : S := LongOctal(500);
-
- Result : S = '000000000764'
-
- Rating : 15400/s
-
-
- Page 20
-
- ---------------------------------------------------------------
- function MotHex(W : Word) : string;
- ---------------------------------------------------------------
-
- Purpose : return an hex string representing a word.
-
- Example : S := MotHex(4096);
-
- Result : S = '$1000'
-
- Rating : 40900/s
-
- ---------------------------------------------------------------
- function MotBin(W : Word) : string;
- ---------------------------------------------------------------
-
- Purpose : Return a binary string representing a word.
-
- Example : S := MotBin(10);
-
- Result : S = '0000000000001010'
-
- Rating : 16000/s
-
- ---------------------------------------------------------------
- function MotOctal(W : Word) : string;
- ---------------------------------------------------------------
-
- Purpose : Return an octal strig representing a word value.
-
- Example : S := MotOctal(65000);
-
- Result : S = '176750'
-
- Rating : 27600/s
-
- ---------------------------------------------------------------
- function OctetHex(B : Byte) : string;
- ---------------------------------------------------------------
-
- Purpose : Return a hexa string representing a byte value.
-
- Example : S := OctetHex(128);
-
- Result : S = '80'
-
- Rating : 63500/s
-
- ---------------------------------------------------------------
- function OctetBin(B : Byte) : string;
- ---------------------------------------------------------------
-
- Purpose : Return a binary string representing a byte value.
-
- Example : S := OctetBin(100);
-
- Result : S = '01100100'
-
- Rating : 31500/s
-
-
-
-
-
- Page 21
-
- ---------------------------------------------------------------
- function OctetOctal(B : Byte) : string;
- ---------------------------------------------------------------
-
- Purpose : Return an octal string representing a byte value.
-
- Example : S := OctetOctal(125);
-
- Result : S = '175'
-
- Rating : 41600/s
-
- ---------------------------------------------------------------
- function PtrHex(P : Pointer) : string;
- ---------------------------------------------------------------
-
- Purpose : Return an hexa string representing a pointer value.
-
- Example : S := PtrHex(Ptr($b800,0));
-
- Result : S = 'B800:0000'
-
- Rating : 23300/s
-
- ---------------------------------------------------------------
- function StrToReal(Str:string):Real;
- ---------------------------------------------------------------
-
- Purpose : Return a real from a string.
-
- Example : R1 := StrToReal('3.141592');
- R2 := StrToReal('ab112.22');
-
- Result : R1 = 3.141592
- R2 = 0.0
-
- ---------------------------------------------------------------
- function StrToLong(Str:string):Longint;
- ---------------------------------------------------------------
-
- Purpose : Return a longint from a string.
-
- Example : l1 := StrToLong('123456');
- L2 := StrToLong('abcedf');
-
- Result : L1 = 123456
- L2 = 0
-
- Rating : 7300/s
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 22
-
- ---------------------------------------------------------------
- function ValidInt(Str:string):boolean;
- ---------------------------------------------------------------
-
- Purpose : Return true if Str is a Valid string for representing an integer.
-
- Example : B1 := ValidInt('125');
- B2 := ValidInt('12r');
- B3 := ValidInt('12.00');
-
- Result : B1 = True
- B2 = False
- B3 = False
-
- Rating : 11600/s
-
- ---------------------------------------------------------------
- function ValidHInt(Str:string):boolean;
- ---------------------------------------------------------------
-
- Purpose : same as previous for hexa strings.
-
- Rating : 13600/s
-
- ---------------------------------------------------------------
- function ValidReal(Str:string):boolean;
- ---------------------------------------------------------------
-
- Purpose : Same as previous for real
-
- Rating : 1095/s
-
- ---------------------------------------------------------------
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3 - REFERENCES Page 23
-
- ---------------------------------------------------------------
- function StrL function StrLF
- function StrR function StrRF
- function StrRFD function StrC
- function StrCF function StrCFD
- function StrD function StrDF
- function StrDFD function StrE
- function StrEF function StrEFD
- function StrS function StrSF
- function StrSFD
-
- Procedure ChrDel Procedure ChrDelL
- Procedure ChrDelR Procedure ChrFill
- Procedure ChrPadC procedure ChrPadL
- Procedure ChrPadR Procedure ChrRepl
- Procedure ChrReplI
-
- Procedure StrCat Function StrCmp
- Function StrCmpI Procedure StrCopy
- Procedure StrCut Procedure StrDeTab
- Procedure StrFill Procedure StrJC
- Procedure StrJL Procedure StrJR
- function StrLwr Procedure StrMove
- Procedure StrOvr Procedure StrPeek
- Procedure StrPoke Procedure StrReTab
- Procedure StrRev function StrUpr
-
- Function IsAscii Function IsCntrl
- Function IsGraph Function IsPrint
- Function IsSigned Function IsSpace
- Function IsAlnum Function IsAlpha
- Function IsDigit Function IsDos
- Function IsFile Function IsLower
- Function IsPunct Function IsReal
- Function IsUpper Function IsHex
- Function IsPath
-
- Function Copy Procedure Delete
- Function Pos function LoCase
- function UpCase function ATrim
- function LTrim function RTrim
- function Replicate Function Soundex
- Function WrdQty function HEXStrToLong
- function LongHex function LongBin
- function LongOctal function MotHex
- function MotBin function MotOctal
- function OctetHex function OctetBin
- function OctetOctal function PtrHex
- function StrToReal function StrToLong
- function ValidInt function ValidHInt
- function ValidReal
-
- ---------------------------------------------------------------
-
-
-
- ----------------end-of-author's-documentation---------------
-
- Software Library Information:
-
- This disk copy provided as a service of
-
- Public (software) Library
-
- We are not the authors of this program, nor are we associated
- with the author in any way other than as a distributor of the
- program in accordance with the author's terms of distribution.
-
- Please direct shareware payments and specific questions about
- this program to the author of the program, whose name appears
- elsewhere in this documentation. If you have trouble getting
- in touch with the author, we will do whatever we can to help
- you with your questions. All programs have been tested and do
- run. To report problems, please use the form that is in the
- file PROBLEM.DOC on many of our disks or in other written for-
- mat with screen printouts, if possible. PsL cannot debug pro-
- programs over the telephone, though we can answer questions.
-
- Disks in the PsL are updated monthly, so if you did not get
- this disk directly from the PsL, you should be aware that the
- files in this set may no longer be the current versions. Also,
- if you got this disk from another vendor and are having prob-
- lems, be aware that some files may have become corrupted or
- lost by that vendor. Get a current, working disk from PsL.
-
- For a copy of the latest monthly software library newsletter
- and a list of the 4,000+ disks in the library, call or write
-
- Public (software) Library
- P.O.Box 35705
- Houston, TX 77235-5705
-
- Orders only:
- 1-800-2424-PSL
- MC/Visa/AmEx/Discover
-
- Outside of U.S. or in Texas
- or for general information,
- Call 1-713-524-6394